<!DOCTYPE html>
<!--
@license
Copyright 2016 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Data Summary examples</title>
  <link rel="import" href="vz-data-summary.html">
  <link rel="import" href="../iron-demo-helpers/demo-snippet.html">
</head>
<body>
<h1>TF Graph example sizes.</h1>
<div style="display:flex">60 x 10&nbsp;
  <div style="width: 60px">
    <vz-data-summary data="[2, 2, 2, 2, 2, 2]"
                     height-width-ratio="0.16">
    </vz-data-summary>
  </div>
</div>
<div style="display:flex">60 x 8&nbsp;&nbsp;&nbsp;
  <div style="width: 60px">
    <vz-data-summary data="[1, 2, 3, 6, 1, 1]"
                     height-width-ratio="0.12">
    </vz-data-summary>
  </div>
</div>
<h1>Initialized with data.</h1>
<div style="width: 30%">
  <demo-snippet>
    <template>
      <vz-data-summary id="first_test" data="[2, 2, 2, 2, 2, 2]">
      </vz-data-summary>
    </template>
  </demo-snippet>
</div>
<h1>Initializes with data and labels.</h1>
<div style="width: 30%">
  <demo-snippet>
    <template>
      <vz-data-summary id="second_test"
                       data="[2, 2, 3, 4, 3, 6]"
                       labels="[0, 1, 2, 3, 4, 5]">
      </vz-data-summary>
    </template>
  </demo-snippet>
</div>
<h1>Initializes with data and labels, overflowing labels.</h1>
<div style="width: 30%">
  <demo-snippet>
    <template>
      <vz-data-summary id="third_test"
                       data="[2, 2, 2, 2, 2, 2]"
                       labels='["fits", "fits", "fits", "OVERFLOW", "fits", "OVERFLOW"]'>
      </vz-data-summary>
    </template>
  </demo-snippet>
</div>
<h1>Small demo, setting height/width=0.2, and
  height/width=0.1.</h1>
<div style="width: 80px">
  <demo-snippet>
    <template>
      <vz-data-summary id="fourth_test"
                       data="[2, 2, 2, 2, 2, 2]"
                       height-width-ratio="0.2">
      </vz-data-summary>
    </template>
  </demo-snippet>
  <demo-snippet>
    <template>
      <vz-data-summary data="[2, 2, 2, 2, 2, 2]"
                       height-width-ratio="0.1">
      </vz-data-summary>
    </template>
  </demo-snippet>
</div>
<h1>Different sizes, illustrate font hidden if too small.</h1>
<div style="display: flex">
  <div style="width: 400px">
    <demo-snippet>
      <template>
        <vz-data-summary data="[2, 2, 2, 2, 2, 2]"
                         height-width-ratio="0.2">
        </vz-data-summary>
      </template>
    </demo-snippet>
  </div>
  <div style="width: 200px">
    <demo-snippet>
      <template>
        <vz-data-summary data="[2, 2, 2, 2, 2, 2]"
                         height-width-ratio="0.2">
        </vz-data-summary>
      </template>
    </demo-snippet>
  </div>
</div>
<h1>Initialize with data and colors.</h1>
<div style="width: 30%">
  <demo-snippet>
    <template>
      <vz-data-summary data="[2, 4, 5, 6, 3, 1]"
                       colors='["#22b0dc", "azure", "#808080 ", "#ddd", "#ffdb00", "#c00"]'>
      </vz-data-summary>
    </template>
  </demo-snippet>
</div>
<h1>Length != 6</h1>
<div style="width: 30%">
  <demo-snippet>
    <template>
      <vz-data-summary data="[12, 3, 55]"
                       colors='["#22b0dc", "azure", "#808080"]'
                       labels='["0", "1", "2"]'>
      </vz-data-summary>
    </template>
  </demo-snippet>
</div>
<h1>Initialized with large text.</h1>
<div style="width: 30%">
  <demo-snippet>
    <template>
      <vz-data-summary data="[5, 1, 1, 1, 1, 1]"
                       height-to-font-ratio="0.8">
      </vz-data-summary>
    </template>
  </demo-snippet>
</div>
<h1>Illustrate min-slice-width setting.</h1>
<h3>Not yet implemented.</h3>
<div style="width: 30%">
  <demo-snippet>
    <template>
      <vz-data-summary data="[200, 200, 200, 200, 200, 1]"
                       labels="[0, 1, 2, 3, 4, 5]">
      </vz-data-summary>
    </template>
  </demo-snippet>
</div>
<div style="width: 50%">
  <h1>Dynamically adding chart to existing SVG.</h1>
  <demo-snippet>
    <template>
      <svg id="chartGroupExample"></svg>
    </template>
  </demo-snippet>
</div>
<script src="vz-data-summary.js"></script>
</body>
</html>
